package com.jiazhong.shixi.diancan_xitong.mapper;

import com.jiazhong.shixi.diancan_xitong.bean.Menu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MenuMapper {

    @Select("select * from menu")
    List<Menu> findByMenu();

    @Select("insert into menu values(null,null,#{price},#{dish_name})")
    void add(Menu menu);

    @Select("update menu set price=#{price},dish_name=#{dish_name} where id=#{id}")
    void update(Menu menu);

}